/**
 * CS180 - Lab 04 - MaleTest.java
 *
 * (Put a brief description of your program here. 
 * For example: A JUnit test case class to test 
 * the functionality of the Male class.)
 *
 * @author Fangning CHENG, <chengf@purdue.edu>
 *
 * @lab LM4 (Put your lab section # here)
 *
 * @Sept 10th 2013 (Put the date you completed this lab here)
 */
 
import org.junit.Test;
import junit.framework.TestCase; 
 
public class MaleTest extends TestCase {
 
    //Hint: Declare some Male instance variables here to
    //be used with testing. 
    //Examples: private Male adult1, adult2, child1, child2; 
 
    /**
     * Initializes the MaleTest for use.
     */
    Male adult1;    //A1
    Male adult2;    //A2
    Male child1;    //C1
    Male child2;    //C2
  
    protected void setUp() throws Exception {
        super.setUp();
        /**
         * Hint: Initialize your Male instances here by calling the
         * constructor with arguments. Try to design Male instances
         * that could make your code fail. For example, test what
         * will happen if the Male is 18 or test when an adult has an
         * LDL of 130. 
         */
        adult1 = new Male("123", 30, 100, 40, 10);
        adult2 = new Male("456", 30, 200, 10, 40);
        child1 = new Male("789", 10, 100, 40, 10);
        child2 = new Male("012", 10, 200, 10, 40);
    }
 
 
    /**
     * Tests the getTotalCholesterol method.
     */
    @Test
    public void testGetTotalCholesterol() {
        // write code to test the getTotalCholesterol() method here
        //Example: assertEquals(adult1.getTotalCholesterol(), 150);
     assertEquals(adult1.getTotalCholesterol(), 150);
     assertEquals(adult2.getTotalCholesterol(), 250);
     assertEquals(child1.getTotalCholesterol(), 150);
     assertEquals(child2.getTotalCholesterol(), 250);
    }
 
 
    /**
     * Tests the hasGoodTotalCholesterol method.
     */
    @Test
    public void testHasGoodTotalCholesterol() {
        // write code to test the hasGoodTotalCholesterol method here
        //Example: assertTrue(adult1.hasGoodTotalCholesterol());
     assertTrue(adult1.hasGoodTotalCholesterol());
     assertTrue(child1.hasGoodTotalCholesterol());
     assertFalse(adult2.hasGoodTotalCholesterol());
     assertFalse(child2.hasGoodTotalCholesterol());
    }
 
 
    /**
     * Tests the hasGoodHDL method.
     */
    @Test
    public void testHasGoodHDL() {
        // write code to test the hasGoodHDL() method here
     assertTrue(adult1.hasGoodHDL());
     assertTrue(child1.hasGoodHDL());
     assertFalse(adult2.hasGoodHDL());
     assertFalse(child2.hasGoodHDL());
    }
 
 
    /**
     * Tests the hasGoodLDL method.
     */
    @Test
    public void testHasGoodLDL() {
        // write code to test the hasGoodLDL() method here
      assertTrue(adult1.hasGoodLDL());
      assertTrue(child1.hasGoodLDL());
      assertFalse(adult2.hasGoodLDL());
      assertFalse(child2.hasGoodLDL());
    }
}